/**
 * 
 */
package com.java.test.audit.dto;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.time.LocalDateTime;
import java.time.ZoneOffset;

import org.springframework.jdbc.core.RowMapper;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @author 待汇款
 *
 */
public class RemitExamineInfo implements RowMapper<RemitExamineInfo> {

	// 主键
	private int id;

	// 账号
	private String gameAccount;

	// 提现金额
	private double remitAmount;

	// 提款方式 -- 提款渠道
	private int remitChannelValue;

	// 渠道名称
	private String remitChannelName;

	// 提款时间
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private LocalDateTime remitTime;

	// 提款账号
	private String remitbankAccount;

	// 审核状态
	private int auditStatus;

	// 审核人
	private String reviewer;

	// 审核时间
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private LocalDateTime auditTime;

	// 订单号
	private String orderNumber;
	
	private String content;
	
	private String game_unique_id;
	
	// 手续费
	private double sxfCharge;
	
	//到账金额
	private double dzjeAmount;
	
	
	
	
	
	public double getSxfCharge() {
		return sxfCharge;
	}

	public void setSxfCharge(double sxfCharge) {
		this.sxfCharge = sxfCharge;
	}

	public double getDzjeAmount() {
		return dzjeAmount;
	}

	public void setDzjeAmount(double dzjeAmount) {
		this.dzjeAmount = dzjeAmount;
	}

	// 汇款状态  1已汇款，2待汇款
	private int remitStatus;

	public LocalDateTime getAuditTime() {
		return auditTime;
	}

	public void setAuditTime(LocalDateTime auditTime) {
		this.auditTime = auditTime;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getGameAccount() {
		return gameAccount;
	}

	public void setGameAccount(String gameAccount) {
		this.gameAccount = gameAccount;
	}

	public double getRemitAmount() {
		return remitAmount;
	}

	public void setRemitAmount(double remitAmount) {
		this.remitAmount = remitAmount;
	}

	public int getRemitChannelValue() {
		return remitChannelValue;
	}

	public void setRemitChannelValue(int remitChannelValue) {
		this.remitChannelValue = remitChannelValue;
	}

	public String getRemitChannelName() {
		return remitChannelName;
	}

	public void setRemitChannelName(String remitChannelName) {
		this.remitChannelName = remitChannelName;
	}

	public LocalDateTime getRemitTime() {
		return remitTime;
	}

	public void setRemitTime(LocalDateTime remitTime) {
		this.remitTime = remitTime;
	}

	public String getRemitbankAccount() {
		return remitbankAccount;
	}

	public void setRemitbankAccount(String remitbankAccount) {
		this.remitbankAccount = remitbankAccount;
	}

	public int getAuditStatus() {
		return auditStatus;
	}

	public void setAuditStatus(int auditStatus) {
		this.auditStatus = auditStatus;
	}

	public String getReviewer() {
		return reviewer;
	}

	public void setReviewer(String reviewer) {
		this.reviewer = reviewer;
	}

	public int getRemitStatus() {
		return remitStatus;
	}

	public void setRemitStatus(int remitStatus) {
		this.remitStatus = remitStatus;
	}

	
	
	public String getOrderNumber() {
		return orderNumber;
	}

	public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber;
	}

	
	
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	
	public String getGame_unique_id() {
		return game_unique_id;
	}

	public void setGame_unique_id(String game_unique_id) {
		this.game_unique_id = game_unique_id;
	}

	@Override
	public RemitExamineInfo mapRow(ResultSet rs, int rowNum) throws SQLException {

		RemitExamineInfo info = new RemitExamineInfo();

		info.setId(rs.getInt("id"));
		info.setAuditStatus(rs.getInt("audit_status"));
		info.setGameAccount(rs.getString("game_account"));
		info.setRemitAmount(rs.getDouble("remit_amount"));
		info.setRemitbankAccount(rs.getString("remit_bankaccount"));
		info.setRemitChannelName(rs.getString("remit_channelname"));
		info.setRemitChannelValue(rs.getInt("remit_channelvalue"));
		info.setRemitStatus(rs.getInt("remit_status"));
		info.setRemitTime(rs.getTimestamp("remit_time").toInstant().atZone(ZoneOffset.ofHours(8)).toLocalDateTime());
		info.setReviewer(rs.getString("reviewer"));
		info.setAuditTime(rs.getTimestamp("audit_time") == null ? null
				: rs.getTimestamp("audit_time").toInstant().atZone(ZoneOffset.ofHours(8)).toLocalDateTime());
		info.setOrderNumber(rs.getString("order_number"));

		info.setContent(rs.getString("content"));
		info.setGame_unique_id(rs.getString("game_unique_id"));
		
		info.setSxfCharge(rs.getDouble("sxf_charge"));
		info.setDzjeAmount(rs.getDouble("dzje_amount"));
		
		return info;
	}

}
